package com.h3c.nem.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.h3c.nem.dto.PmGradeDTO;
import com.h3c.nem.dto.TbTeacherAllowanceDTO;
import com.h3c.nem.dto.TbTeacherDTO;
import com.h3c.nem.entity.TbTeacher;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * Copyright (C), 2020-2020, h3c
 * FileName: ITbTeacherService
 *
 * @Author: l22886
 * @Date: 2022-01-19
 * Description: tb_teacher service
 * Version: 1.0
 */
public interface ITbTeacherService extends IService<TbTeacher> {

    /**
     * @title: selectFuzzyByDto
     * @description: 模糊查询操作
     * @params: [ dto ]
     * @return: java.util.List
     * @createTime: 2022-01-19
     * @version: 1.0
     * @author: l22886
     */
    public List<TbTeacherDTO> selectFuzzyByDto(TbTeacherDTO dto);

    /**
     * @title: selectByDto
     * @description: 精确查询操作
     * @params: [ dto ]
     * @return: java.util.List
     * @createTime: 2022-01-19
     * @version: 1.0
     * @author: l22886
     */
    public List<TbTeacherDTO> selectByDto(TbTeacherDTO dto);

    /**
     * @title: insertDto
     * @description: 插入操作
     * @params: [ dto ]
     * @return: Integer
     * @createTime: 2022-01-19
     * @version: 1.0
     * @author: l22886
     */
    public Integer insertDto(TbTeacherDTO dto);

    public TbTeacherDTO seacherInfo( TbTeacherDTO paramsDTO);

        /**
         * @title: updateDto
         * @description: 修改操作
         * @params: [ dto ]
         * @return: Integer
         * @createTime: 2022-01-19
         * @version: 1.0
         * @author: l22886
         */
    public Integer updateDto(TbTeacherDTO dto);

    /**
     * @title: deleteDto
     * @description: 删除操作
     * @params: [ dto ]
     * @return: Integer
     * @createTime: 2022-01-19
     * @version: 1.0
     * @author: l22886
     */
    public Integer deleteDto(TbTeacherDTO dto);
    public Integer deleteDto(List<TbTeacherDTO> dtos);
    Integer importTeacherList(MultipartFile file);
    public File download(TbTeacherDTO paramsDTO, String templateCode, String fileName);

    List<TbTeacher> getTeacherByKeyWord(String key);

    public Integer syncGrade();

    public void sendEmailByStatus();

    public List<Integer> queryDeptForUser(String userId);

    public List<PmGradeDTO> getPmGradeList(List<String> empCodeList);
    public List<PmGradeDTO> getPmCultureList(List<String> empCodeList);
    public Map<String, String> syncPunishData(Date periodStartDate, Date periodEndDate);
    public List<TbTeacherDTO>  checkTeacherFlag(List<TbTeacherDTO> tbTeacherDTOS);

    PageInfo<TbTeacherAllowanceDTO> getTeacherAllowance(TbTeacherAllowanceDTO paramsDTO, Integer currentPage, Integer pageSize);

    List<TbTeacherAllowanceDTO> queryTeacherAllowanceHandle(TbTeacherAllowanceDTO params);
    Set<Integer> judgeAuth();
    /**
     * 导师即时认证
     * @param workerIdList
     * @return
     */
    public List<String> instantCertificate(List<String> workerIdList);
    /**
     * 选择导师后 若在导师库则继续，否则进行导师即时认证
     * @param workerId
     */
    public void checkSelectTeacher(String workerId);

    /**
     * 每季度第一天从allworker表查现在不是导师的人中的三四级部门的员工中满足初次认证导师资格条件的员工，导师邮件推送给主管，让主管在菜单里发起认证申请，
     */
    public void autoInfoLeaderToCertificate();
    /**
     * 更新发起导师认证的状态
     * @param teacherId 导师id，单个导师更新时使用
     */
    void updateTeacherCertified(String teacherId);

    String checkWorker(String workerId);

    void setTeacherCertForDeptManager();
}
